home *** CD-ROM | disk | FTP | other *** search
- X-Mailer: MicroDot 1.10 [UNREGISTRIERT] via [DOS/NCBMail V2.21 REL.:160995]
- Message-ID: <xRL9hMD0aRz1@point86.people-s.people.de>
- Organization: Artwork Demo Factories ..
- References: <38232442@kone.fipnet.fi> <4h45g4$ije@sunsystem5.informatik.tu-muenchen.de>
- X-Gateway: ZCONNECT UU people-s.people.de [DUUCP vom 01.07.1994]
- MIME-Version: 1.0
- Content-Type: text/plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
- From: azure@people-s.people.de (Tim Boescke)
- Subject: Re: TMapping again!
- Date: 11 Mar 1996 23:03:45 +0100
- Path: people-s.people.de!azure
- Newsgroups: comp.sys.amiga.programmer
- Distribution: world
-
- Reply to Re: TMapping again! / 29.02.1996
- by fischerj@informatik.tu-muenchen.de (Juergen Rally Fischer)
- JF> In article <38232567@kone.fipnet.fi>, "Jyrki Saarinen" <jsaarinen@kone.fipnet.fi> writes:
- JF> |>
- JF> |> > A time ago I did an approach to this problem using a similar trick
- JF> |> > than my two-command mapper.
- JF> |> > (btw. actually this one WORKS .. I have tried it out)
- JF> |> >
- JF> |> >
- JF> |> > move.l d3,d2 ;d3=d4=0000000000000XXXXXXXxxxxxxYYYYYY
- JF> |> > move d0,d5 ;d0=a6=yyyyyyyy000000000000BBBBBBbbbbbb
- JF> |> > and.l d6,d2 ;d6= 00000000000001111111000000111111
- JF> |> > and.b d7,d5 ;d7= xxxxxxxxxxxxxxxxxxxxxxxx11000000
- JF> |> > or d5,d2
- JF> |> > move.b (a4,d2.l),(a2)+ ;d2= 00000000000000xxxxxxbbbbbbyyyyyy
- JF> |> > add.l a6,d0
- JF> |> > addx.l d4,d3
- JF> |> >
- JF> |> > This one is doing Texturemapping + gouraud shading with
- JF> |> > shadetable. (!!)
- JF> |> >
- JF> |> > The Texture is 64x64 (6 bit) and the shading is 6 bit two. You
- JF> |> > will need a 256k combined Texture/Shading table.
- JF> |>
- JF> |> Hmm. Not nice in a game for example where several textures
- JF> |> are needed. But a nice idea anyway!
-
- YOu can use this code with several textures. For example you could
- split up the shading range. For example B=0-31 is textere one and
- B=32-63 is Texture two.. etc. or use 32x32 textures...
-
- JF> nice ? Cooooooool!
- JF> Cool idea to pack the shading value into the texture adress!
-
- Thanks ;)
-
- JF> The example does too much instructions :) but allows more general
- JF> mem usage.
- JF>
- JF> What about this...
- JF>
- JF> add.l a2,d2 0...00BBBbbbbbbbbbbbbbbbb
- JF> add.l a3,d1 x...xxxxxYYYYYYYYyyyyyyyy
- JF> addx.l d3,d0 0...0000000000000XXXXXXXX
- JF> move.l d2,d6
- JF> move.w d1,d6
- JF> move.b d0,d6
- JF> move.b 0(a0,d6.l),(a1)+
- JF>
- JF> 20 cycles gouraud mapping :)
- JF>
- JF> 8 shadingsteps are 512k, not too much even for a A1200 game imho
- JF> (well, people tell me they aim for higher machines anyway,
- JF> so the mem consumption can't be considered so bad ;)
-
- Welll. of course this is two cycles faster, but it takes twice the
- memory and 8 shading steps are simply not enough ;)
-
- JF> I would really think about using this routine, it's really LOT quicker.
- JF> You can put multiple textures into a given 64k range btw. but those can't
- JF> be "repeart-mapped" uh "multiplexed" ? how you call it if x gets 256 and then
- JF> _plop_, 0 again on the left side ? Is this called bump-mapping ? :D
-
- wrap-around textures ?? Well erhm.. Bump-mapping is a bit different.
- (hehe found a nice and fast innerloop for that, too. ;) )
-
- --
- +--------------------------------------------------------------------+
- | - AZURE@PEOPLE-S.people.de - Tim Boescke - AZURE /atw.bzr |
- +---------------------------------<AMIGA,PC,C64,PLUS/4,VCS2600>------+
-